package main

import (
	"chatgpt/ai/openai"
	"chatgpt/config"
	"chatgpt/logq"
	"chatgpt/plugin/elastic"
	"chatgpt/plugin/found"
	"chatgpt/plugin/rpcx"
	"chatgpt/route"
	"chatgpt/services"
	"chatgpt/services/datasrv"
)

func main() {
	config.Init()
	logq.InitLog()
	before()
	route.Run()
}

func before() {
	rpcx.Init(func() {
		//rpcx.Default.SetAddr(datasrv.DataSrvMetaList())
	})
	datasrv.Init()
	rpcx.Auth(datasrv.Login2Datasrv)
	elastic.Init()
	openai.Init()
	services.Init()
	found.Init(nil)
}
